package com.wwl.cms.utils.designModeTest.strategy;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/9/27 19:01
 * @description:策略模式
 */
public class Client {
    public static void main(String[] args) {
        WildDuck wildDuck = new WildDuck();
        wildDuck.fly();

        ToyDuck toyDuck = new ToyDuck();
        toyDuck.fly();

        PekingDuck pekingDuck = new PekingDuck();
        pekingDuck.fly();

        pekingDuck.setFlyBehavior(new NoFlyBehavior());
        System.out.println("北京鸭的实际飞翔能力 ");
        pekingDuck.fly();

    }
}
